<?php
require_once '../../controller.php';
if(isset($_REQUEST['sid'])){
	$sid = $_REQUEST['sid'];



    $sql = "DELETE FROM `survey` WHERE `id` = '$sid'";
    $delete = mysql_query($sql) or die (mysql_error());

    $sql1 = "DELETE FROM `question` WHERE `survey_id` = '$sid'";
    $delete = mysql_query($sql1) or die (mysql_error());

    $sql2 = "DELETE FROM `response` WHERE `survey_id` = '$sid'";
    $delete = mysql_query($sql2) or die (mysql_error());

    $sql3 = "DELETE FROM `response_value` WHERE `survey_id` = '$sid'";
    $delete = mysql_query($sql3) or die (mysql_error());

header("Location: interface.php?del=Y");

}

else{
	header("Location: interface.php?del=N");
}
?>